package com.wxj.book.cms.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wxj.book.cms.dao.ReceiverVoMapper;
import com.wxj.book.cms.service.ReceiverVoService;
import com.wxj.book.cms.vo.ReceiverVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReceiverVoServiceImpl implements ReceiverVoService {
    @Autowired
    private ReceiverVoMapper receiverVoMapper;

    /**
     * 查询所有
     * @param pageNum
     * @param pageSize
     * @return
     */
    @Override
    public PageInfo<ReceiverVo> getAll(Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<ReceiverVo> list = receiverVoMapper.getAll();
        PageInfo<ReceiverVo> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }
}
